package com.sls.nzdapplication.model;

import com.alibaba.fastjson.JSONObject;

import org.greenrobot.greendao.annotation.Entity;
import org.greenrobot.greendao.annotation.Id;

import java.util.Date;
import org.greenrobot.greendao.annotation.Generated;

@Entity
public class SwitchEquipment {

    @Id
    private String id;

    private String sid;

    private String eid;

    private Date createTime;

    private String createBy;

    private Date modifyTime;

    private String modifyBy;

    public JSONObject toJson(){
        JSONObject jsonObject = new JSONObject();
        jsonObject.put("id",this.id);
        jsonObject.put("sid",this.sid);
        jsonObject.put("createTime",this.createTime);
        jsonObject.put("createBy",this.createBy);
        jsonObject.put("modifyTime",this.modifyTime);
        jsonObject.put("modifyBy",this.modifyBy);
        jsonObject.put("eid",this.eid);
        return jsonObject;
    }

    public SwitchEquipment(JSONObject jsonObject){
        this.id = jsonObject.getString("id");
        this.sid = jsonObject.getString("sid");
        this.createTime = jsonObject.getDate("createTime");
        this.createBy = jsonObject.getString("createBy");
        this.modifyBy = jsonObject.getString("modifyBy");
        this.modifyTime = jsonObject.getDate("modifyTime");
        this.eid = jsonObject.getString("eid");
    }

    @Generated(hash = 978511642)
    public SwitchEquipment(String id, String sid, String eid, Date createTime,
            String createBy, Date modifyTime, String modifyBy) {
        this.id = id;
        this.sid = sid;
        this.eid = eid;
        this.createTime = createTime;
        this.createBy = createBy;
        this.modifyTime = modifyTime;
        this.modifyBy = modifyBy;
    }

    @Generated(hash = 49429039)
    public SwitchEquipment() {
    }

    public String getId() {
        return this.id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getSid() {
        return this.sid;
    }

    public void setSid(String sid) {
        this.sid = sid;
    }

    public String getEid() {
        return this.eid;
    }

    public void setEid(String eid) {
        this.eid = eid;
    }

    public Date getCreateTime() {
        return this.createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public String getCreateBy() {
        return this.createBy;
    }

    public void setCreateBy(String createBy) {
        this.createBy = createBy;
    }

    public Date getModifyTime() {
        return this.modifyTime;
    }

    public void setModifyTime(Date modifyTime) {
        this.modifyTime = modifyTime;
    }

    public String getModifyBy() {
        return this.modifyBy;
    }

    public void setModifyBy(String modifyBy) {
        this.modifyBy = modifyBy;
    }
}
